<% for send in sends%>
  <% if send.nickname.nil? 
       display_name = send.login
     else
       display_name = send.nickname
     end
  %>
  <tr>
    <td><%= link_to "#{display_name}", user_path(send.login) %></td>
    <td><%= link_to "#{send.title}", message_path(send.id) %></td>
    <td><%= local_date send.created_at%></td>
    <td>
    <%= check_box("to_be_deleted", send.id, {}, "yes", "no") %>
    </td>
  </tr>
<% end %>
  <tr>
    <td>&nbsp;</td><td>&nbsp;</td>
    <td>
    <input name="b" type="button" value="全选" onClick="CheckAll(true);"/> &nbsp;
    <input name="c" type="button" value="全清" onClick="CheckAll(false);"/>
    </td>
    <td>
    <%= submit_tag '删除选中的邮件' %>
    </td>
  </tr>